using System;
using System.Collections.Generic;

namespace QUAN_LY_NGAN_HANG_CAU_HOI_TRAC_NGHIEM
{
    public class LinhVucBUS
    {
        private LinhVucDAL linhvuc;

        public Guid MaSoLinhVuc
        {
            get { return linhvuc.MaSoLinhVuc; }
            set { linhvuc.MaSoLinhVuc = value; }
        }
              
        public string ChuThich
        {
            get { return linhvuc.ChuThich; }
            set { linhvuc.ChuThich = value; }
        }

        public LinhVucBUS()
        {
            linhvuc = new LinhVucDAL();
        }

        public LinhVucBUS(LinhVucDAL en)
        {
            linhvuc = en;
        }

        public static LinhVucBUS[] LayTatCaLinhVuc()
        {
            List<LinhVucBUS> lst = new List<LinhVucBUS>();
            foreach (LinhVucDAL cn in LinhVucDAL.LayTatCaLinhVuc())
            {
                lst.Add(new LinhVucBUS(cn));
            }
            return lst.ToArray();
        }

        public static LinhVucBUS[] ListLinhVucTheoGiaoVien(Guid maGV)
        {
            List<LinhVucBUS> lst = new List<LinhVucBUS>();
            foreach (LinhVucDAL cn in LinhVucDAL.ListLinhVucTheoGiaoVien(maGV))
            {
                lst.Add(new LinhVucBUS(cn));
            }
            return lst.ToArray();
        }
    }
}